import constant

class Yard_c():
    def __init__(self,id,x,y):
        self.id=id
        self.x,self.y=x,y

    def moveto(self,x,y):
        '''
        yard_c 移动到 x，y 。返回移动到x，y的时间
        :param x:
        :param y:
        :return:
        '''
        cost_time=(abs(self.x-x)+abs(self.y-y))/constant.yc_speed
        self.x=x
        self.y=y
        return cost_time
